﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="DutySchemaSrhForm.aspx.cs" Inherits="App_Input_DutySchemaSrhForm" Title="工作计划分配" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript">
        function openPersonSrh(){
            var url  = "../Commons/EmployeeSearchForm.aspx";
	        var prm  = "?CONTROL_ID=" + "<%= txtAuditing.ClientID %>";
	        prm += "&CONTROL_NAME=" + "<%= txtAuditingPerName.ClientID %>";
	        url += prm;	        
	        var win = window.open(url,'MaterialApproveForm','scrollbars,resizable,height=460,width=500');
	        win.focus();	        	        
        }
            
    </script>
    <table class="table_border_line">
        <tr>
            <td align="left">

                <script language="javascript">
                    (new TitleBar('SearchBar', '检索条件')).showBar();
                </script>

            </td>
        </tr>
    </table>
    <table border="0" class="table_border_line" style="background: ffffff">
        <tr>
            <td class="list_data_bg_left" style="white-space: nowrap; height: 28px;">
                <table border="0" class="table_border_line" style="background: ffffff">
                    <tr>
                        <td style="width: 68px; height: 30px" >
                            &nbsp;</td>
                        <td style="width: 119px; height: 30px;" >
                            员工编号</td>
                        <td style="height: 30px" >
                            <asp:TextBox ID="txtAuditing" runat="server" MaxLength="4" Width="67px"></asp:TextBox><asp:TextBox
                                ID="txtAuditingPerName" runat="server" Width="71px"></asp:TextBox>
                                <a href="#" onclick="javascript:openPersonSrh();">
                                <img id="searchImg" runat="server" src="../../images/search.jpg" border="0" />
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 68px; height: 34px">
                        </td>
                        <td style="width: 119px; height: 34px">
                            排班类型</td>
                        <td style="width: 155px; height: 34px;" >
                            <asp:DropDownList ID="ddlDutyType" runat="server" Width="120" DataTextField="Content" DataValueField="DictNo" /></td>

           
                    </tr>
                    <tr>
                        <td style="height: 55px; width: 68px;" >
                        </td>
                        <td style="width: 119px; height: 55px" >
                        </td>
                        <td style="height: 55px" >
                            <asp:Button ID="btnSearch" runat="server" Text=" 检 索 " OnClick="btnSearch_Click" CssClass="button" Width="85px" />&nbsp;
                            <asp:Button ID="btnAdd" runat="server" Text=" 新 建 " OnClick="btnAdd_Click" CssClass="button" Width="85px" /></td>

                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <p>
        &nbsp;</p>
    <table class="table_border_line">
        <tr>
            <td align="left">

                <script language="javascript">
                    (new TitleBar('ResultBar', '检索结果')).showBar();
                </script>

            </td>
        </tr>
    </table>
    <asp:GridView ID="GridViewResult" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        CssClass="GridView_table" Width="100%" OnRowDataBound="GridViewResult_RowDataBound" OnRowCommand="GridViewResult_RowCommand" OnRowEditing="GridViewResult_RowEditing" OnRowDeleting="GridViewResult_RowDeleting" OnPageIndexChanging="GridViewResult_PageIndexChanging">
        <Columns>
            <asp:BoundField HeaderText="员工编号" DataField="EmployeeId">
                <HeaderStyle CssClass="GridView_head_grayblue" Width="120px" />
                <ItemStyle CssClass="GridView_item_center" />
            </asp:BoundField>
            <asp:BoundField HeaderText="排班名称" DataField="TemplateName">
                <HeaderStyle CssClass="GridView_head_grayblue" />
                <ItemStyle CssClass="GridView_item_left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="排班类型" DataField="TypeName">
                <HeaderStyle CssClass="GridView_head_grayblue" Width="80px" />
                <ItemStyle CssClass="GridView_item_center" />
            </asp:BoundField>
            <asp:BoundField HeaderText="开始执行" DataField="PerformDate" DataFormatString="{0:yyyy/MM/dd}" HtmlEncode="False">
                <HeaderStyle CssClass="GridView_head_grayblue" Width="80px" />
                <ItemStyle CssClass="GridView_item_center" />
            </asp:BoundField>
            <asp:CommandField ButtonType="Image" EditImageUrl="~/images/info.gif" EditText="详细"
                HeaderText="详细" ShowEditButton="True">
                <HeaderStyle CssClass="GridView_head_grayblue" Width="30px" />
                <ItemStyle CssClass="GridView_item_center" />
                <FooterStyle BorderWidth="20px" />
            </asp:CommandField>
            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" Width="30px" />
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                ImageUrl="~/images/delete.jpg" OnClientClick="return confirm('确定删除吗？')" Text="" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
            <asp:TemplateField Visible="False">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DutySchemaId") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="DutySchemaId" runat="server" Text='<%# Bind("DutySchemaId") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="日期判断" Visible="False">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("MaxDate") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="MaxDate" runat="server" Text='<%# Bind("MaxDate") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle HorizontalAlign="Right" />
    </asp:GridView>
</asp:Content>
